package com.hfb.mashibing.alip8.juc.c002;

/**
 * synchronized 关键字
 * 对某个对象加锁
 */
public class T {

    private int count = 10;

    public void m(){
        synchronized(this) {
            count --;
            System.out.println(
                    Thread.currentThread().getName() +
                    " count=" + count);
        }
    }
}
